{yun:}include file="$trainstyle/header.htm"{/yun}
<div class="training_content training_w980">
  {yun:}include file="$trainstyle/left.htm"{/yun}
  <div class="right_column frt mt20">
    <div class="right_column_border">
      <div class="right_column_h1">讲师基本信息</div>
	  <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
      <form id="teamform" name="myform" method="post" target="supportiframe" action="index.php?c=team_add&act=save" class="layui-form" enctype="multipart/form-data">
      <ul class="Basic_in">
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 讲师姓名：</div>
          <div class="Basic_in_right">
            <div class="layui-form-item">
				<div class="layui-input-block">
				  <input type="text" name="name" id="name"  lay-verify="required" placeholder="请输入讲师姓名" value="{yun:}$row.name{/yun}" size="80" style="display:inline;width:202px;" autocomplete="off" class="layui-input input-text">
				</div>
			</div>
            
          </div>
        </li>
        <li>
          <div class="Basic_in_span"><font color="#FF0000">*</font> 擅长领域：</div>
          <div class="Basic_in_right">
          <div class="layui-input-inline" style='float:left'>
		      <select name="sid" id='sid'>
			    {yun:}if $row.sid{/yun}
		 		  {yun:}foreach item=v from=$subject_index{/yun}
	                    {yun:}if $v eq $row.sid{/yun}
	                    <option value="{yun:}$v{/yun}" selected>{yun:}$subject_name[$v]{/yun}</option>
	                    {yun:}else{/yun}
	                    <option value="{yun:}$v{/yun}" >{yun:}$subject_name[$v]{/yun}</option>
	                    {yun:}/if{/yun}
	                {yun:}/foreach{/yun}
	            {yun:}else{/yun}
	                <option value="">请选择擅长领域</option>
	            {yun:}/if{/yun}
		        
		        {yun:}if !$row.sid{/yun}
			        {yun:}foreach item=v from=$subject_index{/yun}
	                	<option value="{yun:}$v{/yun}">{yun:}$subject_name[$v]{/yun}</option>
	                {yun:}/foreach{/yun}
	            {yun:}/if{/yun}
		      </select>
		    </div> 
          </div>
        </li>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 擅长行业：</div>
          <div class="Basic_in_right">
          <div class="layui-input-inline" style='float:left'>
		      <select name="hy" id='hy'>
			    {yun:}if $row.hy{/yun}
		 		  {yun:}foreach item=v from=$industry_index{/yun}
	                    {yun:}if $v eq $row.hy{/yun}
	                    <option value="{yun:}$v{/yun}" selected>{yun:}$industry_name[$v]{/yun}</option>
	                    {yun:}else{/yun}
	                    <option value="{yun:}$v{/yun}" >{yun:}$industry_name[$v]{/yun}</option>
	                    {yun:}/if{/yun}
	                {yun:}/foreach{/yun}
	            {yun:}else{/yun}
	                <option value="">请选择擅长行业</option>
	            {yun:}/if{/yun}
		        
		        {yun:}if !$row.hy{/yun}
			        {yun:}foreach item=v from=$industry_index{/yun}
	                	<option value="{yun:}$v{/yun}">{yun:}$industry_name[$v]{/yun}</option>
	                {yun:}/foreach{/yun}
	            {yun:}/if{/yun}
		      </select>
		    </div>
           </div>
        </li>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 所在地区：</div>
          <div class="Basic_in_right">
            <table><tr><td>
		      <select name="provinceid" id='provinceid' value="{yun:}$row.provinceid{/yun}" lay-filter="citys">
		     	{yun:}if $row.provinceid{/yun}
	 		  	{yun:}foreach item=v from=$city_index{/yun}
                    {yun:}if $v eq $row.provinceid{/yun}
                    <option value="{yun:}$v{/yun}" selected>{yun:}$city_name[$v]{/yun}</option>
                    {yun:}else{/yun}
                    <option value="{yun:}$v{/yun}" >{yun:}$city_name[$v]{/yun}</option>
                    {yun:}/if{/yun}
                {yun:}/foreach{/yun}
	            {yun:}else{/yun}
	                <option value="">请选择</option>
	            {yun:}/if{/yun}
			    
		        {yun:}if !$info.id{/yun}
			        {yun:}foreach item=v from=$city_index{/yun}
	                	<option value="{yun:}$v{/yun}">{yun:}$city_name[$v]{/yun}</option>
	                {yun:}/foreach{/yun}
	            {yun:}/if{/yun}
		      </select>
          </td>
            <td>
		      <select name="cityid" id='cityid' value="{yun:}$row.cityid{/yun}" lay-filter="citys">
		     	{yun:}if $row.cityid{/yun}
	 		  	{yun:}foreach item=v from=$city_type[$row.provinceid]{/yun}
                    {yun:}if $v eq $row.cityid{/yun}
                    <option value="{yun:}$v{/yun}" selected>{yun:}$city_name[$v]{/yun}</option>
                    {yun:}else{/yun}
                    <option value="{yun:}$v{/yun}" >{yun:}$city_name[$v]{/yun}</option>
                    {yun:}/if{/yun}
                {yun:}/foreach{/yun}
	            {yun:}else{/yun}
	                <option value="">请选择</option>
	            {yun:}/if{/yun}
			    
		        {yun:}if !$row.cityid{/yun}
			        {yun:}foreach item=v from=$city_type[$row.provinceid]{/yun}
	                	<option value="{yun:}$v{/yun}">{yun:}$city_name[$v]{/yun}</option>
	                {yun:}/foreach{/yun}
	            {yun:}/if{/yun}
		      </select>
            </td>
            <td id='cityshowth'>
		      <select name="threecityid" id='three_cityid' value="{yun:}$row.threecityid{/yun}" lay-filter="swIdss">
		     	{yun:}if $row.threecityid{/yun}
	 		  	{yun:}foreach item=v from=$city_type[$row.cityid]{/yun}
                    {yun:}if $v eq $row.threecityid{/yun}
                    <option value="{yun:}$v{/yun}" selected>{yun:}$city_name[$v]{/yun}</option>
                    {yun:}else{/yun}
                    <option value="{yun:}$v{/yun}" >{yun:}$city_name[$v]{/yun}</option>
                    {yun:}/if{/yun}
                {yun:}/foreach{/yun}
	            {yun:}else{/yun}
	                <option value="">请选择</option>
	            {yun:}/if{/yun}
			    
		        {yun:}if !$row.threecityid{/yun}
			        {yun:}foreach item=v from=$city_type[$row.cityid]{/yun}
	                	<option value="{yun:}$v{/yun}">{yun:}$city_name[$v]{/yun}</option>
	                {yun:}/foreach{/yun}
	            {yun:}/if{/yun}
		      </select>
            </td>
            </tr></table>
          </div>
        </li>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 讲师简介：</div>
          <div class="Basic_in_right">
 			<script id="content" name="content" type="text/plain" style="width:500px; height:150px;"> {yun:}$row.content{/yun} </script>
          </div>
        </li>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 讲师形象：</div>
          <div class="Basic_in_right" style="line-height:38px;">
			<button type="button" class="yun_bth_pic adminupload" lay-data="{name: 'pic',imgid: 'imgicon',parentid: 'imgparent'}">上传图片</button>
			<input type="hidden" id="layupload_type" value="2"/>
			<input type="hidden" id="upload_path" value="team"/>
			<input type="hidden" name="pic" value="{yun:}$row.pic{/yun}"/>
            <span class="basic_size">最佳尺寸100*120</span> </div>
        </li>
        <li id="imgparent" {yun:}if !$row.pic{/yun}class="none"{yun:}/if{/yun}>
          <div  class="Basic_in_span">预览讲师：</div>
          <div class="Basic_in_right">
          <img id="imgicon" src=".{yun:}$row.pic{/yun}" width="100" height="60" />
		  </div>
        </li>
        <li>
          <div  class="Basic_in_span">&nbsp;</div>
          <div class="Basic_in_right">
         	<input type="hidden" name="id" id="id" value="{yun:}$row.id{/yun}" />
            <input type="button" onclick="checkpost()" value="提交" class="Basic_in_bth">
          </div>
        </li>
      </ul>
      </form>
    </div>
  </div>
</div>
<style>
.layui-form-item {margin-bottom: 0px;clear: both;}
.layui-input-block {margin-left: 0px;}
.Basic_in_span {line-height: 38px;}
.layui-select-title{width:158px;}
.layui-form-select{width:158px;margin-right:5px;}
</style>
<script src="{yun:}$config.sy_weburl{/yun}/js/public.js?v={yun:}$config.cachecode{/yun}"></script>
<script language="javascript">
	layui.use(['form'], function(){   
});
function checkpost(){
	if($.trim($("#name").val())==""){
		layer.msg('讲师姓名不能为空！',2,8);return false;
	}
	if($("#sid").val()==""){
		layer.msg('请选择擅长领域！',2,8);return false;
	}
	if($("#hy").val()==""){
		layer.msg('请选择擅长行业！',2,8);return false;
	}
	if($("#cityid").val()==""){
		layer.msg('请选择所在地区！',2,8);return false;
	}
	var html = UE.getEditor('content').getContent();
	if(html==""){
		layer.msg('讲师简介不能为空！',2,8);return false;
	}
	if($("input[name=pic]").val()=="" && $("#id").val()==""){
		layer.msg('请上传讲师形象！',2,8);return false;
	}
	$("#teamform").submit();
	layer.load('执行中，请稍候...',0);
}
</script>
<script language=javascript src='{yun:}$config.sy_weburl{/yun}/data/plus/city.cache.js?v={yun:}$config.cachecode{/yun}'></script>
<script language=javascript src='{yun:}$config.sy_weburl{/yun}/js/city.js?v={yun:}$config.cachecode{/yun}'></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.config.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.all.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script language="javascript">
	var editor = UE.getEditor('content',{
		toolbars:[[ 'Source','|', 'Undo', 'Redo','Bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'fontfamily', 'fontsize',  'forecolor', 'backcolor', 'removeformat', 'autotypeset', 'pasteplain', '|','insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|','simpleupload', '|','link', 'unlink', 'indent', '|','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify']],wordCount:false,elementPathEnabled:false,initialFrameHeight:150
	});
</script>
{yun:}include file="$trainstyle/footer.htm"{/yun}